package com.topinfo.etl.bean;

import com.jpx.component.model.annotation.ModelAnnotation;
import com.topinfo.component.base.bean.AbstractModel;
import com.topinfo.etl.util.DateFormatUtil;

import java.util.List;

public class EtlSynctableCfg extends AbstractModel {
    private String tableId;
    private String tableName;
    private List<EtlSynctableCol> tableColList;
    private String createTime;

    public String getCreateTime() {
        if(createTime == null)
            createTime = DateFormatUtil.getNowDate("yyyy-MM-dd HH:mm:ss");
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public EtlSynctableCfg() {
    }

    public EtlSynctableCfg(String tableId, String tableName) {
        this.tableId = tableId;
        this.tableName = tableName;
    }

    public String getTableId() {
        return tableId;
    }

    public void setTableId(String tableId) {
        this.tableId = tableId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public List<EtlSynctableCol> getTableColList() {
        return tableColList;
    }

    public void setTableColList(List<EtlSynctableCol> tableColList) {
        this.tableColList = tableColList;
    }

    @Override
    public String toString() {
        return "EtlSynctableCfg{" +
                "tableId='" + tableId + '\'' +
                ", tableName='" + tableName + '\'' +
                ", tableColList=" + tableColList +
                '}';
    }
}
